﻿using MiniFox.Infrastructure;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Dispatcher.Core.Mail.Models
{
    [JsonObject]
    public class MailLog
    {
        [Key, Display(Name ="编号", ShortName = "编号")]
        public string ExecutionID{ get; set; }

        [Display(Name = "上下文编号", ShortName = "上下文")]
        public string ContextID{ get; set; }

        [Display(Name = "帐号名", ShortName = "帐号名")]
        public string AccountName{ get; set; }

        [Display(Name = "模板名", ShortName = "模板名")]
        public string TemplateName{ get; set; }

        [Display(Name = "数据模型")]
        public string Data{ get; set; }

        [Display(Name = "发件人", ShortName = "发件人")]
        public string Sender{ get; set; }

        [Display(Name = "发件人", ShortName = "收件人")]
        public string Receiver{ get; set; }

        [Display(Name = "标题", ShortName = "标题")]
        public string Title{ get; set; }

        [Display(Name = "邮件主体")]
        public string Body{ get; set; }

        [Display(Name = "抄送人")]
        public string CCList{ get; set; }

        [Display(Name = "暗抄人")]
        public string BCCList{ get; set; }

        [Display(Name = "发送时间", ShortName = "发送时间")]
        public DateTime SendTime{ get; set; }
    }


    public class FailLog : MailLog
    {
        [Display(Name = "异常信息")]
        public string Exception { get; set; }
    }
}
